//
//  MYVisiterController.swift
//  sinaWeibo
//
//  Created by 于 on 16/8/8.
//  Copyright © 2016年 于. All rights reserved.
//

import UIKit

class MYVisiterController: UITableViewController {

    var isLogin: Bool = false
    
    var visiterView: MYVisiterView?
    
    override func loadView() {
        
        if isLogin {
        
        super.loadView()
        
        }else {
        
         visiterView = MYVisiterView()
           visiterView?.backgroundColor = UIColor(white: 237.0 / 255.0, alpha: 1)
            
            visiterView?.passValue = { [weak self] in
            
            print("登录 或 注册 ", self)
            
            }
            
            
        view = visiterView
        
            setUpUI()
            
        }
        
        
    }
    
    func setUpUI() {
        
        
    navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登录", target: self, action: "login")
     navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", target: self, action: "register")
    
    }
    
    func login() {
    
        print("登录")
    }
    
    func register() {
    
        print("注册")
    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

      
    }

  
}
